package ast;

import compiler.OutputFormatter;

public class Variable extends Expression {

    private Type type = null;
    private String name = null;

    public Variable(Type type, String name) {
        setType(type);
        setName(name);
    }

    @Override
    public void genC(OutputFormatter of) {
        of.output(getName());
    }

    public String getName() {
        return name;
    }

    public Type getType() {
        return type;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setType(Type type) {
        this.type = type;
    }
}
